import type { ObjectDirective } from 'vue'

export const isLeaf: ObjectDirective = {
  mounted(el: HTMLButtonElement, binding, vnode) {
    const leafLength = el.children.length
    if (leafLength === 0) {
      // 删除父节点
      // el?.parentNode?.parentNode.removeChild(el.parentNode)
    }    
  }
}
